<?php
namespace Home\Widget;
use Think\Controller;

class HotWidget extends Controller  {

    public function hot($data){
    	$this->article = M('article')->field(array('id','title','click'))->order('click DESC')->limit(10)->select();
    	return $this->fetch('Widget:hot');
    }
    public function latest($data){
    	$this->article = M('article')->field(array('id','title','click'))->order('time DESC')->limit(10)->select();
    	return $this->fetch('Widget:latest');
    }

}